<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <!-- MOTW-DISABLED saved from url=(0014)about:internet -->
    <title>BirtDateTime</title>
    <link rel="StyleSheet" href="css/ScriptingReference.css" type="text/css" media="all" />
    <link rel="StyleSheet" href="css/webworks.css" type="text/css" media="all" />
    <link rel="StyleSheet" href="webworks.css" type="text/css" media="all" />
    <script type="text/javascript" language="JavaScript1.2">
      <!--
        var  WebWorksRootPath = "";
      // -->
    </script>
  </head>
  <body>
    <div style="text-align: left;">
      <table cellspacing="0" summary="">
        <tr>
          <td>
            <a href="ScriptingReference.24.3.html"><img src="images/prev.gif" alt="Previous" border="0" /></a>
          </td>
          <td>
            <a href="ScriptingReference.24.5.html"><img src="images/next.gif" alt="Next" border="0" /></a>
          </td>
        </tr>
      </table>
    </div>
    <hr align="left" />
    <blockquote>
      <h2 class="RH1_Class">Class  <a name="275576">BirtDateTime</a></h2>
      <p class="b_Body"><a name="237677">The BirtDateTime class provides functions to determine the amount of time between two dates or times, to add or subtract time spans, and to get parts of a date. Since date spans are just numbers, the application can use normal math on them: multiplication, division, addition, subtraction, and so on. This class is static. The application cannot create instances of the class.</a></p>
      <h3 class="RH2_Method"><a name="237678">BirtDateTime.addDay</a></h3>
      <p class="b_Body"><a name="238095">This function returns a new date that results from adding a given number of days to a date. The number of days to add can be negative. In this case, the result is as if that number is subtracted from the date.</a></p>
      <p class="N_sb_ScanBold"><a name="238096">Syntax</a></p>
      <div class="rs_RSyntax"><a name="238097">Date BirtDateTime.addDay( Date date, Number n )</a></div>
      <p class="N_sb_ScanBold"><a name="238098">Parameters</a></p>
      <p class="RParameter"><a name="237686">date</a></p>
      <p class="bn_BodyNoLead"><a name="237687">Date object. A date object that represents the start date.</a></p>
      <p class="RParameter"><a name="237692">n</a></p>
      <p class="bn_BodyNoLead"><a name="237693">Number object. The number of days to add to the date. Decimals are treated as integers, rounded down to the nearest integer.</a></p>
      <p class="N_sb_ScanBold"><a name="237694">Returns</a></p>
      <p class="b_Body"><a name="237695">Date object. A date that results from adding the specified number of days to the start date.</a></p>
      <p class="N_sb_ScanBold"><a name="237696">Examples</a></p>
      <p class="b_Body"><a name="237697">The following example adds days to a specific date:</a></p>
      <div class="cf_CodeFirst"><a name="251891">var startDate = "2008-12-31"; </a></div>
      <div class="co_Code"><a name="237698">var endDate;</a></div>
      <div class="co_Code"><a name="237699">endDate = BirtDateTime.addDay( startDate, 1 ); // returns Jan 01, 2009</a></div>
      <div class="co_Code"><a name="238325">endDate = BirtDateTime.addDay( startDate, -1 ); // returns Dec 30, 2008</a></div>
      <p class="b_Body"><a name="251947">The following example adds 15 days to each date value in the InvoiceDate field:</a></p>
      <div class="cf_CodeFirst"><a name="252065">BirtDateTime.addDay( row["InvoiceDate"], 15 )</a></div>
      <h3 class="RH2_Method"><a name="238714">BirtDateTime.addHour</a></h3>
      <p class="b_Body"><a name="238715">This function returns a new date that results from adding a given number of hours to a date. The number of hours to add can be negative. In this case, the result is as if that number is subtracted from the date.</a></p>
      <p class="N_sb_ScanBold"><a name="238716">Syntax</a></p>
      <div class="rs_RSyntax"><a name="238717">Date BirtDateTime.addHour( Date date, Number n )</a></div>
      <p class="N_sb_ScanBold"><a name="238718">Parameters</a></p>
      <p class="RParameter"><a name="238719">date</a></p>
      <p class="bn_BodyNoLead"><a name="251550">A date object that represents the start date. If a start date does not have a time value, the function assumes the time is midnight (00:00:00).</a></p>
      <p class="RParameter"><a name="251551">n</a></p>
      <p class="bn_BodyNoLead"><a name="238722">Number object. The number of hours to add to the date.</a></p>
      <p class="N_sb_ScanBold"><a name="238723">Returns</a></p>
      <p class="b_Body"><a name="238724">Date object. A date that results from adding the specified number of hours to the start date.</a></p>
      <p class="N_sb_ScanBold"><a name="238725">Examples</a></p>
      <p class="b_Body"><a name="252174">The following example adds hours to a specific date and time:</a></p>
      <div class="cf_CodeFirst"><a name="238726">var startDate = "2008-12-31 15:00:00"; </a></div>
      <div class="co_Code"><a name="238727">var endDate;</a></div>
      <div class="co_Code"><a name="238728">endDate = BirtDateTime.addHour( startDate, 8 ); // returns Dec 31, 2008 11:00 PM</a></div>
      <div class="co_Code"><a name="238729">endDate = BirtDateTime.addHour( startDate, -8 ); // returns Dec 31, 2008 7:00 AM</a></div>
      <p class="b_Body"><a name="252547">The following example adds 36 hours to each date value in the StartTime field:</a></p>
      <div class="cf_CodeFirst"><a name="252548">BirtDateTime.addHour( row["StartTime"], 36 )</a></div>
      <h3 class="RH2_Method"><a name="240681">BirtDateTime.addMinute</a></h3>
      <p class="b_Body"><a name="240682">This function returns a new date that results from adding a given number of minutes to a date. The number of minutes to add can be negative. In this case, the result is as if that number is subtracted from the date.</a></p>
      <p class="N_sb_ScanBold"><a name="240683">Syntax</a></p>
      <div class="rs_RSyntax"><a name="240684">Date BirtDateTime.addMinute( Date date, Number n )</a></div>
      <p class="N_sb_ScanBold"><a name="240685">Parameters</a></p>
      <p class="RParameter"><a name="240686">date</a></p>
      <p class="bn_BodyNoLead"><a name="240687">A date object that represents the start date. If a start date does not have a time value, the function assumes the time is midnight (00:00:00).</a></p>
      <p class="RParameter"><a name="240688">n</a></p>
      <p class="bn_BodyNoLead"><a name="240689">Number object. The number of minutes to add to the date.</a></p>
      <p class="N_sb_ScanBold"><a name="240690">Returns</a></p>
      <p class="b_Body"><a name="240691">Date object. A date that results from adding the specified number of minutes to the start date.</a></p>
      <p class="N_sb_ScanBold"><a name="240692">Examples</a></p>
      <p class="b_Body"><a name="252214">The following example adds minutes to a specific date and time:</a></p>
      <div class="cf_CodeFirst"><a name="240693">var startDate = "2008-12-31 10:30:00"; </a></div>
      <div class="co_Code"><a name="240694">var endDate;</a></div>
      <div class="co_Code"><a name="240695">endDate = BirtDateTime.addMinute( startDate, 45 ); </a></div>
      <div class="co_Code"><a name="241028">// returns Dec 31, 2008 11:15 AM</a></div>
      <div class="co_Code"><a name="240696">endDate = BirtDateTime.addMinute( startDate, -30 ); </a></div>
      <div class="co_Code"><a name="241045">// returns Dec 31, 2008 10:00 AM</a></div>
      <p class="b_Body"><a name="252608">The following example adds 15 minutes to each date value in the StartTime field:</a></p>
      <div class="cf_CodeFirst"><a name="252609">BirtDateTime.addMinute( row["StartTime"], 15 )</a></div>
      <h3 class="RH2_Method"><a name="241080">BirtDateTime.addMonth</a></h3>
      <p class="b_Body"><a name="241081">This function returns a new date that results from adding a given number of months to a date. The number of months to add can be negative. In this case, the result is as if that number is subtracted from the date.</a></p>
      <p class="b_Body"><a name="241274">This function always returns a valid date. If necessary, the day part of the resulting date is adjusted downward to the last day of the resulting month in the resulting year. For example, if you add 1 month to Jan 31, 2008, addMonth(&nbsp;) returns Feb 29, 2008 (2008 is a leap year), not Feb 31, 2008.</a></p>
      <p class="N_sb_ScanBold"><a name="241082">Syntax</a></p>
      <div class="rs_RSyntax"><a name="241083">Date BirtDateTime.addMonth( Date date, Number n )</a></div>
      <p class="N_sb_ScanBold"><a name="241084">Parameters</a></p>
      <p class="RParameter"><a name="241085">date</a></p>
      <p class="bn_BodyNoLead"><a name="241086">Date object. A date object that represents the start date. </a></p>
      <p class="RParameter"><a name="241087">n</a></p>
      <p class="bn_BodyNoLead"><a name="241088">Number object. The number of months to add to the date. Decimals are treated as integers, rounded down.</a></p>
      <p class="N_sb_ScanBold"><a name="241089">Returns</a></p>
      <p class="b_Body"><a name="241090">Date object. A date that results from adding the specified number of months to the start date.</a></p>
      <p class="N_sb_ScanBold"><a name="241091">Examples</a></p>
      <p class="b_Body"><a name="252246">The following example adds months to a specific date:</a></p>
      <div class="cf_CodeFirst"><a name="241092">var startDate = "2008-12-31"; </a></div>
      <div class="co_Code"><a name="241093">var endDate;</a></div>
      <div class="co_Code"><a name="241266">endDate = BirtDateTime.addMonth( startDate, 1 ); // returns Jan 31, 2009</a></div>
      <div class="co_Code"><a name="241267">endDate = BirtDateTime.addMonth( startDate, -1 ); // returns Nov 30, 2008</a></div>
      <div class="co_Code"><a name="241268">endDate = BirtDateTime.addMonth( startDate, 2 ); // returns Feb 28, 2009</a></div>
      <p class="b_Body"><a name="252826">The following example adds 10 months to each date value in the InvoiceDate field:</a></p>
      <div class="cf_CodeFirst"><a name="252827">BirtDateTime.addMonth( row["InvoiceDate"], 10 )</a></div>
      <h3 class="RH2_Method"><a name="250566">BirtDateTime.addQuarter</a></h3>
      <p class="b_Body"><a name="250567">This function returns a new date that results from adding a given number of quarters to a date. A quarter is equal to three months. For example, if you add 2 quarters to Sep 10, 2008, the function returns Mar 10, 2009. The number of quarters to add can be negative. In this case, the result is as if that number is subtracted from the date.</a></p>
      <p class="N_sb_ScanBold"><a name="250568">Syntax</a></p>
      <div class="rs_RSyntax"><a name="250569">Date BirtDateTime.addQuarter( Date date, Number n )</a></div>
      <p class="N_sb_ScanBold"><a name="250570">Parameters</a></p>
      <p class="RParameter"><a name="250571">date</a></p>
      <p class="bn_BodyNoLead"><a name="250572">A date object that represents the start date.</a></p>
      <p class="RParameter"><a name="250573">n</a></p>
      <p class="bn_BodyNoLead"><a name="250574">Number object. The number of quarters to add to the date.</a></p>
      <p class="N_sb_ScanBold"><a name="250575">Returns</a></p>
      <p class="b_Body"><a name="250576">Date object. A date that results from adding the specified number of quarters to the start date.</a></p>
      <p class="N_sb_ScanBold"><a name="250634">Examples</a></p>
      <p class="b_Body"><a name="252353">The following example adds quarters to a specific date:</a></p>
      <div class="cf_CodeFirst"><a name="250645">var startDate = "2008-12-15"; </a></div>
      <div class="co_Code"><a name="250646">var endDate;</a></div>
      <div class="co_Code"><a name="250647">endDate = BirtDateTime.addQuarter( startDate, 1 ); //returns Mar 15, 2009</a></div>
      <div class="co_Code"><a name="250640">endDate = BirtDateTime.addQuarter( startDate, -2 ); //returns Jun 15, 2008</a></div>
      <p class="b_Body"><a name="252844">The following example adds 2 quarters to each date value in the ForecastClosing field:</a></p>
      <div class="cf_CodeFirst"><a name="252845">BirtDateTime.addQuarter( row["ForecastClosing"], 2 )</a></div>
      <h3 class="RH2_Method"><a name="250699">BirtDateTime.addSecond</a></h3>
      <p class="b_Body"><a name="250700">This function returns a new date that results from adding a given number of seconds to a date. The number of seconds to add can be negative. In this case, the result is as if that number is subtracted from the date.</a></p>
      <p class="N_sb_ScanBold"><a name="250701">Syntax</a></p>
      <div class="rs_RSyntax"><a name="250702">Date BirtDateTime.addSecond( Date date, Number n )</a></div>
      <p class="N_sb_ScanBold"><a name="250703">Parameters</a></p>
      <p class="RParameter"><a name="250704">date</a></p>
      <p class="bn_BodyNoLead"><a name="250705">A date object that represents the start date. If a start date does not have a time value, the function assumes the time is midnight (00:00:00).</a></p>
      <p class="RParameter"><a name="250706">n</a></p>
      <p class="bn_BodyNoLead"><a name="250707">Number object. The number of seconds to add to the date.</a></p>
      <p class="N_sb_ScanBold"><a name="250708">Returns</a></p>
      <p class="b_Body"><a name="250709">Date object. The result from adding the specified number of seconds to the start date.</a></p>
      <p class="N_sb_ScanBold"><a name="250710">Examples</a></p>
      <p class="b_Body"><a name="252370">The following example adds seconds to a specific date and time:</a></p>
      <div class="cf_CodeFirst"><a name="250936">var startDate = "2008-12-31 10:30:00"; </a></div>
      <div class="co_Code"><a name="251062">var endDate;</a></div>
      <div class="co_Code"><a name="251063">endDate = BirtDateTime.addSecond( startDate, 10000 ); </a></div>
      <div class="co_Code"><a name="251115">// returns returns Dec 31, 2008 1:16:40 PM</a></div>
      <div class="co_Code"><a name="251064">endDate = BirtDateTime.addSecond( startDate, -10000 ); </a></div>
      <div class="co_Code"><a name="251144">// returns Dec 31, 2008 7:43:20 AM</a></div>
      <p class="b_Body"><a name="253064">The following example adds 6000 seconds to each date value in the StartTime field:</a></p>
      <div class="cf_CodeFirst"><a name="253065">BirtDateTime.addSecond( row["StartTime"], 6000 )</a></div>
      <h3 class="RH2_Method"><a name="251173">BirtDateTime.addWeek</a></h3>
      <p class="b_Body"><a name="251174">This function returns a new date that results from adding a given number of weeks to a date. The number of weeks to add can be negative. In this case, the result is as if that number is subtracted from the date.</a></p>
      <p class="N_sb_ScanBold"><a name="251175">Syntax</a></p>
      <div class="rs_RSyntax"><a name="251176">Date BirtDateTime.addWeek( Date date, Number n )</a></div>
      <p class="N_sb_ScanBold"><a name="251177">Parameters</a></p>
      <p class="RParameter"><a name="251178">date</a></p>
      <p class="bn_BodyNoLead"><a name="251179">A date object that represents the start date.</a></p>
      <p class="RParameter"><a name="251180">n</a></p>
      <p class="bn_BodyNoLead"><a name="251181">Number Object. The number of weeks to add to the date.</a></p>
      <p class="N_sb_ScanBold"><a name="251182">Returns</a></p>
      <p class="b_Body"><a name="251183">Date object. A date that results from adding the specified number of weeks to the start date.</a></p>
      <p class="N_sb_ScanBold"><a name="251184">Examples</a></p>
      <p class="b_Body"><a name="252443">The following example adds weeks to a specific date:</a></p>
      <div class="cf_CodeFirst"><a name="251245">var startDate = "2008-12-31"; </a></div>
      <div class="co_Code"><a name="251246">var endDate;</a></div>
      <div class="co_Code"><a name="251247">endDate = BirtDateTime.addWeek( startDate, 1 ); // returns Jan 07, 2009</a></div>
      <div class="co_Code"><a name="251190">endDate = BirtDateTime.addWeek( startDate, -1 ); // returns Dec 24, 2008</a></div>
      <p class="b_Body"><a name="253420">The following example adds 2 weeks to each date value in the InvoiceDate field:</a></p>
      <div class="cf_CodeFirst"><a name="253421">BirtDateTime.addWeek( row["InvoiceDate"], 2 )</a></div>
      <h3 class="RH2_Method"><a name="251319">BirtDateTime.addYear</a></h3>
      <p class="b_Body"><a name="251320">This function returns a new date that results from adding a given number of years to a date. The number of years to add can be negative. In this case, the result is as if that number is subtracted from the date.</a></p>
      <p class="N_sb_ScanBold"><a name="251321">Syntax</a></p>
      <div class="rs_RSyntax"><a name="251322">Date BirtDateTime.addYear( Date date, Number n )</a></div>
      <p class="N_sb_ScanBold"><a name="251323">Parameters</a></p>
      <p class="RParameter"><a name="251324">date</a></p>
      <p class="bn_BodyNoLead"><a name="251325">A date object that represents the start date.</a></p>
      <p class="RParameter"><a name="251326">n</a></p>
      <p class="bn_BodyNoLead"><a name="251327">Number object.The number of years to add to the date. Decimals are treated as integers, rounded down.</a></p>
      <p class="N_sb_ScanBold"><a name="251328">Returns</a></p>
      <p class="b_Body"><a name="251329">A date that results from adding the specified number of years to the start date.</a></p>
      <p class="N_sb_ScanBold"><a name="251330">Examples</a></p>
      <p class="b_Body"><a name="252526">The following example adds years to a specific date:</a></p>
      <div class="cf_CodeFirst"><a name="251331">var startDate = "2008-12-31"; </a></div>
      <div class="co_Code"><a name="251332">var endDate;</a></div>
      <div class="co_Code"><a name="251333">endDate = BirtDateTime.addYear( startDate, 1 ); // returns Dec 31, 2009</a></div>
      <div class="co_Code"><a name="251334">endDate = BirtDateTime.addYear( startDate, -1 ); // returns Dec 31, 2007</a></div>
      <p class="b_Body"><a name="253482">The following example adds 5 years to each date value in the HireDate field:</a></p>
      <div class="cf_CodeFirst"><a name="253483">BirtDateTime.addYear( row["HireDate"], 5 )</a></div>
      <h3 class="RH2_Method"><a name="299888">BirtDateTime.day</a></h3>
      <p class="b_Body"><a name="299889">This function returns a number from 1 to 31 that represents the day of the month for a given date. For example, if the date is 2009-01-19, the function returns 19.</a></p>
      <p class="N_sb_ScanBold"><a name="299890">Syntax</a></p>
      <div class="rs_RSyntax"><a name="299891">integer BirtDateTime.day( Date date )</a></div>
      <p class="N_sb_ScanBold"><a name="299892">Parameter</a></p>
      <p class="RParameter"><a name="299893">date</a></p>
      <p class="bn_BodyNoLead"><a name="299894">Date object. A date object from which to get the day.</a></p>
      <p class="N_sb_ScanBold"><a name="299895">Returns</a></p>
      <p class="b_Body"><a name="299896">An integer that represents the day of the month for a given date.</a></p>
      <p class="N_sb_ScanBold"><a name="299897">Examples</a></p>
      <p class="b_Body"><a name="299898">The following example returns the day of the month for each value in the ShipDate field:</a></p>
      <div class="cf_CodeFirst"><a name="299899">BirtDateTime.day( row["ShipDate"] ) </a></div>
      <p class="b_Body"><a name="299900">The following example returns the day of the month for the current date:</a></p>
      <div class="cf_CodeFirst"><a name="299901">BirtDateTime.day( (BirtDateTime.today())</a></div>
      <h3 class="RH2_Method"><a name="299854">BirtDateTime.diffDay</a></h3>
      <p class="b_Body"><a name="251586">This function returns the number of days between two dates. A day is calculated by subtracting the day value of the first date from the day value of the second date. For example, if the first date is 2008-12-30 23:59:59 and the second date is 2008-12-31 00:00:00, the function returns 1 day, even though only one second separates the two dates.</a></p>
      <p class="N_sb_ScanBold"><a name="251663">Syntax</a></p>
      <div class="rs_RSyntax"><a name="251664">integer BirtDateTime.diffDay( Date date1, Date date2 )</a></div>
      <p class="N_sb_ScanBold"><a name="251665">Parameters</a></p>
      <p class="RParameter"><a name="251666">date1</a></p>
      <p class="bn_BodyNoLead"><a name="251667">A date object that represents the start of the time span.</a></p>
      <p class="RParameter"><a name="251668">date2</a></p>
      <p class="bn_BodyNoLead"><a name="251669">A date object that represents the end of the time span.</a></p>
      <p class="N_sb_ScanBold"><a name="251670">Returns</a></p>
      <p class="b_Body"><a name="251671">Integer. The number of days between two dates.</a></p>
      <p class="N_sb_ScanBold"><a name="251672">Examples</a></p>
      <p class="b_Body"><a name="253881">The following example returns the number of days between specific dates:</a></p>
      <div class="cf_CodeFirst"><a name="253884">BirtDateTime.diffDay( "2009-01-01", "2009-04-15" ) // returns 104</a></div>
      <p class="b_Body"><a name="253879">The following example returns the number of days from the current date to the end of 2009:</a></p>
      <div class="cf_CodeFirst"><a name="251885">BirtDateTime.diffDay( BirtDateTime.today(), "2009-12-31" ) </a></div>
      <p class="b_Body"><a name="253588">The following example returns the number of days between values in the InvoiceDate and PaymentDate fields:</a></p>
      <div class="cf_CodeFirst"><a name="253589">BirtDateTime.diffDay( row["InvoiceDate"], row["PaymentDate"] )</a></div>
      <h3 class="RH2_Method"><a name="253604">BirtDateTime.diffHour</a></h3>
      <p class="b_Body"><a name="253605">This function returns the number of hours between two dates. An hour is calculated by subtracting the hour value of the first date from the hour value of the second date. For example, if the first date is 2009-01-31 1:30:00 and the second date is 2009-01-31 2:00:00, the function returns 1 hour, even though only 30 minutes separates the two dates. If a date does not have a time value, the function assumes the time is midnight (00:00:00).</a></p>
      <p class="N_sb_ScanBold"><a name="253606">Syntax</a></p>
      <div class="rs_RSyntax"><a name="253607">integer BirtDateTime.diffHour( Date date1, Date date2 )</a></div>
      <p class="N_sb_ScanBold"><a name="253608">Parameters</a></p>
      <p class="RParameter"><a name="253609">date1</a></p>
      <p class="bn_BodyNoLead"><a name="253610">A date object that represents the start of the time span.</a></p>
      <p class="RParameter"><a name="253611">date2</a></p>
      <p class="bn_BodyNoLead"><a name="253612">A date object that represents the end of the time span.</a></p>
      <p class="N_sb_ScanBold"><a name="253613">Returns</a></p>
      <p class="b_Body"><a name="253614">Integer. The number of hours between two dates.</a></p>
      <p class="N_sb_ScanBold"><a name="253615">Examples</a></p>
      <p class="b_Body"><a name="254473">The following example returns the number of hours between specific dates:</a></p>
      <div class="cf_CodeFirst"><a name="254518">BirtDateTime.diffHour( "2009-01-31 12:00:00", "2009-02-01 12:00:00")</a></div>
      <div class="co_Code"><a name="254579">// returns 24</a></div>
      <div class="cf_CodeFirst"><a name="254474">BirtDateTime.diffHour( "2009-01-31", "2009-02-01 12:00:00")</a></div>
      <div class="co_Code"><a name="254596">// returns 36. Because the first date does not have a time, midnight is assumed.</a></div>
      <p class="b_Body"><a name="254451">The following example returns the number of hours from the current date and time to the end of 2009:</a></p>
      <div class="cf_CodeFirst"><a name="253617">BirtDateTime.diffHour( BirtDateTime.now(), "2009-12-31" );</a></div>
      <p class="b_Body"><a name="253618">The following example returns the number of hours between values in the StartTime and FinishTime fields:</a></p>
      <div class="cf_CodeFirst"><a name="253619">BirtDateTime.diffHour( row["StartTime"], row["FinishTime"] )</a></div>
      <h3 class="RH2_Method"><a name="254614">BirtDateTime.diffMinute</a></h3>
      <p class="b_Body"><a name="254615">This function returns the number of minutes between two dates. A minute is calculated by subtracting the minute value of the first date from the minute value of the second date. For example, if the first date is 2009-01-31 1:30:59 and the second date is 2009-01-31 1:31:00, the function returns 1 minute, even though only one second separates the two dates. If a date does not have a time value, the function assumes the time is midnight (00:00:00).</a></p>
      <p class="N_sb_ScanBold"><a name="254616">Syntax</a></p>
      <div class="rs_RSyntax"><a name="254617">integer BirtDateTime.diffMinute( Date date1, Date date2 )</a></div>
      <p class="N_sb_ScanBold"><a name="254618">Parameters</a></p>
      <p class="RParameter"><a name="254619">date1</a></p>
      <p class="bn_BodyNoLead"><a name="254620">A date object that represents the start of the time span.</a></p>
      <p class="RParameter"><a name="254621">date2</a></p>
      <p class="bn_BodyNoLead"><a name="254622">A date object that represents the end of the time span.</a></p>
      <p class="N_sb_ScanBold"><a name="254623">Returns</a></p>
      <p class="b_Body"><a name="254624">Integer. The number of minutes between two dates.</a></p>
      <p class="N_sb_ScanBold"><a name="254625">Examples</a></p>
      <p class="b_Body"><a name="254626">The following example returns the number of minutes between specific dates:</a></p>
      <div class="cf_CodeFirst"><a name="254627">BirtDateTime.diffMinute( "2009-01-31 1:30:30", "2009-01-31 10:45:00")</a></div>
      <div class="co_Code"><a name="254628">// returns 555</a></div>
      <div class="cf_CodeFirst"><a name="254629">BirtDateTime.diffMinute( "2009-01-31", "2009-01-31 12:00:00")</a></div>
      <div class="co_Code"><a name="254630">// returns 720. Because the first date does not have a time, midnight is assumed.</a></div>
      <p class="b_Body"><a name="254631">The following example returns the number of minutes from the current date and time to the beginning of 2010:</a></p>
      <div class="cf_CodeFirst"><a name="254632">BirtDateTime.diffMinute( BirtDateTime.now(), "2010-01-01" ) </a></div>
      <p class="b_Body"><a name="254633">The following example returns the number of minutes between values in the StartTime and FinishTime fields:</a></p>
      <div class="cf_CodeFirst"><a name="254634">BirtDateTime.diffMinute( row["StartTime"], row["FinishTime"] )</a></div>
      <h3 class="RH2_Method"><a name="256490">BirtDateTime.diffMonth</a></h3>
      <p class="b_Body"><a name="256491">This function returns the number of months between two dates. A month is calculated by subtracting the month value of the first date from the month value of the second date. For example, if the first date is 2009-01-31 and the second date is 2009-02-01, the function returns 1 month, even though only one day separates the two dates.</a></p>
      <p class="N_sb_ScanBold"><a name="256492">Syntax</a></p>
      <div class="rs_RSyntax"><a name="256493">integer BirtDateTime.diffMonth( Date date1, Date date2 )</a></div>
      <p class="N_sb_ScanBold"><a name="256494">Parameters</a></p>
      <p class="RParameter"><a name="256495">date1</a></p>
      <p class="bn_BodyNoLead"><a name="256496">A date object that represents the start of the time span.</a></p>
      <p class="RParameter"><a name="256497">date2</a></p>
      <p class="bn_BodyNoLead"><a name="256498">A date object that represents the end of the time span.</a></p>
      <p class="N_sb_ScanBold"><a name="256499">Returns</a></p>
      <p class="b_Body"><a name="256500">Integer. The number of months between two dates.</a></p>
      <p class="N_sb_ScanBold"><a name="256501">Examples</a></p>
      <p class="b_Body"><a name="256502">The following example returns the number of months between specific dates:</a></p>
      <div class="cf_CodeFirst"><a name="256503">BirtDateTime.diffMonth( "2009-01-31", "2009-04-15") // returns 3</a></div>
      <p class="b_Body"><a name="256507">The following example returns the number of months from the current date to the beginning of 2010:</a></p>
      <div class="cf_CodeFirst"><a name="256508">BirtDateTime.diffMonth( BirtDateTime.today(), "2010-01-01" ); </a></div>
      <p class="b_Body"><a name="256509">The following example returns the number of months between values in the ProjectStart and ProjectComplete fields:</a></p>
      <div class="cf_CodeFirst"><a name="256510">BirtDateTime.diffMonth( row["ProjectStart"], row["ProjectComplete"] )</a></div>
      <h3 class="RH2_Method"><a name="256921">BirtDateTime.diffQuarter</a></h3>
      <p class="b_Body"><a name="256922">This function returns the number of quarters between two dates. A quarter is calculated by subtracting the month value of the first date from the month value of the second date. A difference of 3 months is equal to 1 quarter. For example, if the first date is 2009-01-31 and the second date is 2009-07-01, the function returns 2. If the first date is 2009-01-01 and the second date is 2009-09-30, the function also returns 2.</a></p>
      <p class="N_sb_ScanBold"><a name="256923">Syntax</a></p>
      <div class="rs_RSyntax"><a name="256924">integer BirtDateTime.diffQuarter( Date date1, Date date2 )</a></div>
      <p class="N_sb_ScanBold"><a name="256925">Parameters</a></p>
      <p class="RParameter"><a name="256926">date1</a></p>
      <p class="bn_BodyNoLead"><a name="256927">A date object that represents the start of the time span.</a></p>
      <p class="RParameter"><a name="256928">date2</a></p>
      <p class="bn_BodyNoLead"><a name="256929">A date object that represents the end of the time span.</a></p>
      <p class="N_sb_ScanBold"><a name="256930">Returns</a></p>
      <p class="b_Body"><a name="256931">Integer. The number of quarters between two dates.</a></p>
      <p class="N_sb_ScanBold"><a name="256932">Examples</a></p>
      <p class="b_Body"><a name="256933">The following example returns the number of quarters between specific dates:</a></p>
      <div class="cf_CodeFirst"><a name="256934">BirtDateTime.diffQuarter( "2009-01-31", "2009-04-15") // returns 1</a></div>
      <p class="b_Body"><a name="256935">The following example returns the number of quarters from the current date to the beginning of 2010:</a></p>
      <div class="cf_CodeFirst"><a name="256936">BirtDateTime.diffQuarter( BirtDateTime.today(), "2010-01-01" ); </a></div>
      <p class="b_Body"><a name="256937">The following example returns the number of quarters between values in the ProjectStart and ProjectComplete fields:</a></p>
      <div class="cf_CodeFirst"><a name="256938">BirtDateTime.diffQuarter( row["ProjectStart"], row["ProjectComplete"] )</a></div>
      <h3 class="RH2_Method"><a name="257251">BirtDateTime.diffSecond</a></h3>
      <p class="b_Body"><a name="257252">This function returns the number of seconds between two dates. If a date does not have a time value, the function assumes the time is midnight (00:00:00).</a></p>
      <p class="N_sb_ScanBold"><a name="257253">Syntax</a></p>
      <div class="rs_RSyntax"><a name="257254">integer BirtDateTime.diffSecond( date1, date2 )</a></div>
      <p class="N_sb_ScanBold"><a name="257255">Parameters</a></p>
      <p class="RParameter"><a name="257256">date1</a></p>
      <p class="bn_BodyNoLead"><a name="257257">A date object that represents the start of the time span.</a></p>
      <p class="RParameter"><a name="257258">date2</a></p>
      <p class="bn_BodyNoLead"><a name="257259">A date object that represents the end of the time span.</a></p>
      <p class="N_sb_ScanBold"><a name="257260">Returns</a></p>
      <p class="b_Body"><a name="257261">Integer. The number of seconds between two dates.</a></p>
      <p class="N_sb_ScanBold"><a name="257262">Examples</a></p>
      <p class="b_Body"><a name="257263">The following example returns the number of seconds between specific dates:</a></p>
      <div class="cf_CodeFirst"><a name="257264">BirtDateTime.diffSecond( "2009-01-31 11:30:30", "2009-01-31 12:00:00")</a></div>
      <div class="co_Code"><a name="257265">// returns 1770</a></div>
      <div class="cf_CodeFirst"><a name="257266">BirtDateTime.diffSecond( "2009-01-31", "2009-01-31 1:00:00")</a></div>
      <div class="co_Code"><a name="257267">// returns 3600. Because the first date does not have a time, midnight is assumed.</a></div>
      <p class="b_Body"><a name="257268">The following example returns the number of seconds from the current date and time to the beginning of 2010:</a></p>
      <div class="cf_CodeFirst"><a name="257269">BirtDateTime.diffSecond( BirtDateTime.now(), "2010-01-01" ) </a></div>
      <p class="b_Body"><a name="257270">The following example returns the number of seconds between values in the StartTime and FinishTime fields:</a></p>
      <div class="cf_CodeFirst"><a name="257271">BirtDateTime.diffSecond( row["StartTime"], row["FinishTime"] )</a></div>
      <h3 class="RH2_Method"><a name="257380">BirtDateTime.diffWeek</a></h3>
      <p class="b_Body"><a name="257381">This function returns the number of weeks between two dates. A week is calculated by subtracting the week number of the first date from the week number of the second date. For example, if the first date is 2009-01-02 (week 1 of the year) and the second date is 2009-01-05 (week 2 of the year), the function returns 1 week, even though only three days separates the two dates.</a></p>
      <p class="N_sb_ScanBold"><a name="257382">Syntax</a></p>
      <div class="rs_RSyntax"><a name="257383">integer BirtDateTime.diffWeek( Date date1, Date date2 )</a></div>
      <p class="N_sb_ScanBold"><a name="257384">Parameters</a></p>
      <p class="RParameter"><a name="257385">date1</a></p>
      <p class="bn_BodyNoLead"><a name="257386">A date object that represents the start of the time span.</a></p>
      <p class="RParameter"><a name="257387">date2</a></p>
      <p class="bn_BodyNoLead"><a name="257388">A date object that represents the end of the time span.</a></p>
      <p class="N_sb_ScanBold"><a name="257389">Returns</a></p>
      <p class="b_Body"><a name="257390">Integer. The number of weeks between two dates.</a></p>
      <p class="N_sb_ScanBold"><a name="257391">Examples</a></p>
      <p class="b_Body"><a name="257392">The following example returns the number of weeks between specific dates:</a></p>
      <div class="cf_CodeFirst"><a name="257393">BirtDateTime.diffWeek( "2009-01-01", "2009-02-01") // returns 5</a></div>
      <p class="b_Body"><a name="257394">The following example returns the number of weeks from the current date to the beginning of 2010:</a></p>
      <div class="cf_CodeFirst"><a name="257395">BirtDateTime.diffWeek( BirtDateTime.today(), "2010-01-01" ); </a></div>
      <p class="b_Body"><a name="257396">The following example returns the number of weeks between values in the ProjectStart and ProjectComplete fields:</a></p>
      <div class="cf_CodeFirst"><a name="257397">BirtDateTime.diffWeek( row["ProjectStart"], row["ProjectComplete"] )</a></div>
      <h3 class="RH2_Method"><a name="257633">BirtDateTime.diffYear</a></h3>
      <p class="b_Body"><a name="257634">This function returns the number of years between two dates. A year is calculated by subtracting the year value of the first date from the year value of the second date. For example, if the first date is 2009-01-01 and the second date is 2009-12-31, the function returns 0. If the first date is 2008-11-15 and the second date is 2009-01-15, the function returns 1.</a></p>
      <p class="N_sb_ScanBold"><a name="257635">Syntax</a></p>
      <div class="rs_RSyntax"><a name="257636">integer BirtDateTime.diffYear( Date date1, Date date2 )</a></div>
      <p class="N_sb_ScanBold"><a name="257637">Parameters</a></p>
      <p class="RParameter"><a name="257638">date1</a></p>
      <p class="bn_BodyNoLead"><a name="257639">A date object that represents the start of the time span.</a></p>
      <p class="RParameter"><a name="257640">date2</a></p>
      <p class="bn_BodyNoLead"><a name="257641">A date object that represents the end of the time span.</a></p>
      <p class="N_sb_ScanBold"><a name="257642">Returns</a></p>
      <p class="b_Body"><a name="257643">Integer. The number of years between two dates.</a></p>
      <p class="N_sb_ScanBold"><a name="257644">Examples</a></p>
      <p class="b_Body"><a name="257645">The following example returns the number of years between specific dates:</a></p>
      <div class="cf_CodeFirst"><a name="257646">BirtDateTime.diffYear( "2005-01-01", "2009-06-01") // returns 4</a></div>
      <p class="b_Body"><a name="257647">The following example returns the number of years between each value in the HireDate field and the current date:</a></p>
      <div class="cf_CodeFirst"><a name="257648">BirtDateTime.diffYear( row["HireDate"], BirtDateTime.today() )</a></div>
      <h3 class="RH2_Method"><a name="362480">BirtDateTime.diffYear</a></h3>
      <p class="b_Body"><a name="362481">This function returns the number of years between two dates. A year is calculated by subtracting the year value of the first date from the year value of the second date. For example, if the first date is 2009-01-01 and the second date is 2009-12-31, the function returns 0. If the first date is 2008-11-15 and the second date is 2009-01-15, the function returns 1.</a></p>
      <p class="N_sb_ScanBold"><a name="362482">Syntax</a></p>
      <div class="rs_RSyntax"><a name="362483">integer BirtDateTime.diffYear( Date date1, Date date2 )</a></div>
      <p class="N_sb_ScanBold"><a name="362484">Parameters</a></p>
      <p class="RParameter"><a name="362485">date1</a></p>
      <p class="bn_BodyNoLead"><a name="362486">A date object that represents the start of the time span.</a></p>
      <p class="RParameter"><a name="362487">date2</a></p>
      <p class="bn_BodyNoLead"><a name="362488">A date object that represents the end of the time span.</a></p>
      <p class="N_sb_ScanBold"><a name="362489">Returns</a></p>
      <p class="b_Body"><a name="362490">Integer. The number of years between two dates.</a></p>
      <p class="N_sb_ScanBold"><a name="362491">Examples</a></p>
      <p class="b_Body"><a name="362492">The following example returns the number of years between specific dates:</a></p>
      <div class="cf_CodeFirst"><a name="362493">BirtDateTime.diffYear( "2005-01-01", "2009-06-01") // returns 4</a></div>
      <p class="b_Body"><a name="362494">The following example returns the number of years between each value in the HireDate field and the current date:</a></p>
      <div class="cf_CodeFirst"><a name="362495">BirtDateTime.diffYear( row["HireDate"], BirtDateTime.today() )</a></div>
      <h3 class="RH2_Method"><a name="259860">BirtDateTime.firstDayOfMonth</a></h3>
      <p class="b_Body"><a name="259861">This function returns the date for the first day of the month in which the input date falls.</a></p>
      <p class="N_sb_ScanBold"><a name="362981">Syntax</a></p>
      <div class="rs_RSyntax"><a name="362982">Date BirtDateTime.firstDayOfMonth( Date date)</a></div>
      <p class="N_sb_ScanBold"><a name="362983">Parameters</a></p>
      <p class="RParameter"><a name="259865">date</a></p>
      <p class="bn_BodyNoLead"><a name="259866">A date object from which to get the month.</a></p>
      <p class="N_sb_ScanBold"><a name="259867">Returns</a></p>
      <p class="b_Body"><a name="259868">Date object. The first day of the month for a given date.</a></p>
      <p class="N_sb_ScanBold"><a name="259869">Examples</a></p>
      <p class="b_Body"><a name="259870">The following example shows the month values returned for a specific date:</a></p>
      <div class="cf_CodeFirst"><a name="362891">BirtDateTime.firstDayOfMonth( "2009-02-15" ) // returns 2009-02-01</a></div>
      <h3 class="RH2_Method"><a name="362973">BirtDateTime.firstDayOfQuarter</a></h3>
      <p class="b_Body"><a name="362974">This function returns the date for the first day of the quarter in which the input date falls.</a></p>
      <p class="N_sb_ScanBold"><a name="362963">Syntax</a></p>
      <div class="rs_RSyntax"><a name="362964">Date BirtDateTime.firstDayOfQuarter( Date date)</a></div>
      <p class="N_sb_ScanBold"><a name="362965">Parameters</a></p>
      <p class="RParameter"><a name="362954">date</a></p>
      <p class="bn_BodyNoLead"><a name="362955">A date object from which to get the quarter.</a></p>
      <p class="N_sb_ScanBold"><a name="362956">Returns</a></p>
      <p class="b_Body"><a name="362946">Date object. The first day of the quarter for a given date.</a></p>
      <p class="N_sb_ScanBold"><a name="362947">Examples</a></p>
      <p class="b_Body"><a name="362937">The following example shows the quarter values returned for a specific date:</a></p>
      <div class="cf_CodeFirst"><a name="362938">BirtDateTime.firstDayOfQuarter( "2009-02-15" ) // returns 2009-01-01</a></div>
      <h3 class="RH2_Method"><a name="363021">BirtDateTime.firstDayOfWeek</a></h3>
      <p class="b_Body"><a name="363022">This function returns the date for the first day of the Week in which the input date falls, which is always a Sunday.</a></p>
      <p class="N_sb_ScanBold"><a name="363023">Syntax</a></p>
      <div class="rs_RSyntax"><a name="363024">Date BirtDateTime.firstDayOfWeek( Date date)</a></div>
      <p class="N_sb_ScanBold"><a name="363025">Parameters</a></p>
      <p class="RParameter"><a name="363026">date</a></p>
      <p class="bn_BodyNoLead"><a name="363027">A date object from which to get the Week.</a></p>
      <p class="N_sb_ScanBold"><a name="363028">Returns</a></p>
      <p class="b_Body"><a name="363029">Date object. The first day of the Week for a given date.</a></p>
      <p class="N_sb_ScanBold"><a name="363030">Examples</a></p>
      <p class="b_Body"><a name="363031">The following example shows the Week values returned for a specific date:</a></p>
      <div class="cf_CodeFirst"><a name="363032">BirtDateTime.firstDayOfWeek( "2009-02-15" ) // returns 2009-02-15</a></div>
      <h3 class="RH2_Method"><a name="363508">BirtDateTime.firstDayOfYear</a></h3>
      <p class="b_Body"><a name="363509">This function returns the date for the first day of the Year in which the input date falls.</a></p>
      <p class="N_sb_ScanBold"><a name="363510">Syntax</a></p>
      <div class="rs_RSyntax"><a name="363511">Date BirtDateTime.firstDayOfYear( Date date)</a></div>
      <p class="N_sb_ScanBold"><a name="363512">Parameters</a></p>
      <p class="RParameter"><a name="363513">date</a></p>
      <p class="bn_BodyNoLead"><a name="363514">A date object from which to get the Year.</a></p>
      <p class="N_sb_ScanBold"><a name="363515">Returns</a></p>
      <p class="b_Body"><a name="363516">Date object. The first day of the Year for a given date.</a></p>
      <p class="N_sb_ScanBold"><a name="363517">Examples</a></p>
      <p class="b_Body"><a name="363518">The following example shows the Year values returned for a specific date:</a></p>
      <div class="cf_CodeFirst"><a name="363519">BirtDateTime.firstDayOfYear( "2009-02-15" ) // returns 2009-01-01</a></div>
      <h3 class="RH2_Method"><a name="363063">BirtDateTime.month</a></h3>
      <p class="b_Body"><a name="363064">This function returns the month for a given date. Depending on the option you specify, the function returns the month as a number, the full month name, or the abbreviated month name. The month name is locale-specific.</a></p>
      <p class="N_sb_ScanBold"><a name="363065">Syntax</a></p>
      <div class="rs_RSyntax"><a name="363066">string BirtDateTime.month( Date date, integer option )</a></div>
      <p class="N_sb_ScanBold"><a name="363067">Parameters</a></p>
      <p class="RParameter"><a name="363068">date</a></p>
      <p class="bn_BodyNoLead"><a name="363069">A date object from which to get the month.</a></p>
      <p class="RParameter"><a name="363070">option</a></p>
      <p class="bn_BodyNoLead"><a name="363071">Integer. Optional. A number that represents the month format to return. Use one of the following values:</a></p>
      <div class="b1_Bullet1_outer" style="margin-left: 0pt">
        <table border="0" cellspacing="0" cellpadding="0" summary="" role="presentation">
          <tr style="vertical-align: baseline">
            <td>
              <div class="b1_Bullet1_inner" style="width: 14.1732283464567pt; white-space: nowrap">
                <img src="Bullet.png" alt="*" border="0" width="6" height="6" />
              </div>
            </td>
            <td width="100%">
              <div class="b1_Bullet1_inner"><a name="363072">1 to get the month as a number from 1 to 12</a></div>
            </td>
          </tr>
        </table>
      </div>
      <div class="b1_Bullet1_outer" style="margin-left: 0pt">
        <table border="0" cellspacing="0" cellpadding="0" summary="" role="presentation">
          <tr style="vertical-align: baseline">
            <td>
              <div class="b1_Bullet1_inner" style="width: 14.1732283464567pt; white-space: nowrap">
                <img src="Bullet.png" alt="*" border="0" width="6" height="6" />
              </div>
            </td>
            <td width="100%">
              <div class="b1_Bullet1_inner"><a name="363073">2 to get the full month name, for example, January</a></div>
            </td>
          </tr>
        </table>
      </div>
      <div class="b1_Bullet1_outer" style="margin-left: 0pt">
        <table border="0" cellspacing="0" cellpadding="0" summary="" role="presentation">
          <tr style="vertical-align: baseline">
            <td>
              <div class="b1_Bullet1_inner" style="width: 14.1732283464567pt; white-space: nowrap">
                <img src="Bullet.png" alt="*" border="0" width="6" height="6" />
              </div>
            </td>
            <td width="100%">
              <div class="b1_Bullet1_inner"><a name="363074">3 to get the abbreviated month name, for example, Jan</a></div>
            </td>
          </tr>
        </table>
      </div>
      <p class="b_Body"><a name="363075">If you omit this argument, the function returns the month as a number.</a></p>
      <p class="N_sb_ScanBold"><a name="363076">Returns</a></p>
      <p class="b_Body"><a name="363077">String. The month for a given date.</a></p>
      <p class="N_sb_ScanBold"><a name="363078">Examples</a></p>
      <p class="b_Body"><a name="363079">The following example shows the month values returned for a specific date:</a></p>
      <div class="cf_CodeFirst"><a name="363080">BirtDateTime.month( "2009-02-15" ) // returns 2</a></div>
      <div class="co_Code"><a name="363081">BirtDateTime.month( "2009-02-15", 2 ) // returns February</a></div>
      <div class="co_Code"><a name="363082">BirtDateTime.month( "2009-02-15", 3) // returns Feb</a></div>
      <p class="b_Body"><a name="363083">The following example returns the month for the current date:</a></p>
      <div class="cf_CodeFirst"><a name="363084">BirtDateTime.month( (BirtDateTime.today() )</a></div>
      <h3 class="RH2_Method"><a name="362929">BirtDateTime.now</a></h3>
      <p class="b_Body"><a name="362905">This function returns the current date and time, for example, Feb 2, 2009 2:05 PM.</a></p>
      <p class="N_sb_ScanBold"><a name="261365">Syntax</a></p>
      <div class="rs_RSyntax"><a name="261366">Date BirtDateTime.now(&nbsp;)</a></div>
      <p class="N_sb_ScanBold"><a name="261370">Returns</a></p>
      <p class="b_Body"><a name="261371">Date object. The current date and time.</a></p>
      <p class="N_sb_ScanBold"><a name="261372">Example</a></p>
      <p class="b_Body"><a name="261373">The following example returns the number of hours from the current date and time to Christmas:</a></p>
      <div class="cf_CodeFirst"><a name="261374">BirtDateTime.diffHour( BirtDateTime.now(), "2009-12-25" )</a></div>
      <h3 class="RH2_Method"><a name="260047">BirtDateTime.quarter</a></h3>
      <p class="b_Body"><a name="260048">This function returns a number from 1 to 4 that represents the quarter in which a given date falls. The first quarter begins on January 1.</a></p>
      <p class="N_sb_ScanBold"><a name="260049">Syntax</a></p>
      <div class="rs_RSyntax"><a name="260050">integer BirtDateTime.quarter( Date date )</a></div>
      <p class="N_sb_ScanBold"><a name="260051">Parameter</a></p>
      <p class="RParameter"><a name="260052">date</a></p>
      <p class="bn_BodyNoLead"><a name="260053">A date object from which to get the quarter number.</a></p>
      <p class="N_sb_ScanBold"><a name="260060">Returns</a></p>
      <p class="b_Body"><a name="260061">Integer. The quarter number for a given date.</a></p>
      <p class="N_sb_ScanBold"><a name="260062">Examples</a></p>
      <p class="b_Body"><a name="260063">The following example shows the quarter numbers returned for specific dates:</a></p>
      <div class="cf_CodeFirst"><a name="260498">BirtDateTime.quarter( "2009-02-15" ) // returns 1</a></div>
      <div class="co_Code"><a name="260499">BirtDateTime.quarter( "2009-07-10" ) // returns 3</a></div>
      <p class="b_Body"><a name="260471">The following example returns the quarter number for each value in the CloseDate field:</a></p>
      <div class="cf_CodeFirst"><a name="260064">BirtDateTime.quarter( row["CloseDate"] )</a></div>
      <p class="b_Body"><a name="260067">The following example returns the quarter number for the current date:</a></p>
      <div class="cf_CodeFirst"><a name="260068">BirtDateTime.quarter( (BirtDateTime.today() )</a></div>
      <h3 class="RH2_Method"><a name="261571">BirtDateTime.today</a></h3>
      <p class="b_Body"><a name="261572">This function returns the current date that includes a time value of midnight, for example, Feb 2, 2009 12:00 AM.</a></p>
      <p class="N_sb_ScanBold"><a name="261573">Syntax</a></p>
      <div class="rs_RSyntax"><a name="261574">Date BirtDateTime.today(&nbsp;)</a></div>
      <p class="N_sb_ScanBold"><a name="261575">Returns</a></p>
      <p class="b_Body"><a name="261576">Date object. The current date with a time value of midnight.</a></p>
      <p class="N_sb_ScanBold"><a name="261577">Examples</a></p>
      <p class="b_Body"><a name="261578">The following example returns the number of days from the current date to Christmas:</a></p>
      <div class="cf_CodeFirst"><a name="261579">BirtDateTime.diffDay( BirtDateTime.today(), "2009-12-25" )</a></div>
      <p class="b_Body"><a name="261670">The following example calculates the number of years from each value in the HireDate data field to the current date.</a></p>
      <div class="cf_CodeFirst"><a name="261671">BirtDateTime.diffYear( [HireDate], BirtDateTime.today() )</a></div>
      <h3 class="RH2_Method"><a name="260568">BirtDateTime.week</a></h3>
      <p class="b_Body"><a name="260569">This function returns a number from 1 to 52 that represents the week number for a given date.</a></p>
      <p class="N_sb_ScanBold"><a name="260570">Syntax</a></p>
      <div class="rs_RSyntax"><a name="260571">integer BirtDateTime.week( date )</a></div>
      <p class="N_sb_ScanBold"><a name="260572">Parameter</a></p>
      <p class="RParameter"><a name="363579">date</a></p>
      <p class="bn_BodyNoLead"><a name="363580">A date object from which to get the week number.</a></p>
      <p class="N_sb_ScanBold"><a name="363581">Returns</a></p>
      <p class="b_Body"><a name="260576">Integer. The week number for a given date.</a></p>
      <p class="N_sb_ScanBold"><a name="260577">Examples</a></p>
      <p class="b_Body"><a name="260578">The following example shows the week numbers returned for specific dates:</a></p>
      <div class="cf_CodeFirst"><a name="260579">BirtDateTime.week( "2009-02-15" ) // returns 8</a></div>
      <div class="co_Code"><a name="260580">BirtDateTime.week( "2009-10-12" ) // returns 42</a></div>
      <p class="b_Body"><a name="260581">The following example returns the week number for each value in the CloseDate field:</a></p>
      <div class="cf_CodeFirst"><a name="260582">BirtDateTime.week( row["CloseDate"] )</a></div>
      <p class="b_Body"><a name="260583">The following example returns the week number for the current date:</a></p>
      <div class="cf_CodeFirst"><a name="260584">BirtDateTime.week( (BirtDateTime.today() )</a></div>
      <h3 class="RH2_Method"><a name="260744">BirtDateTime.weekDay</a></h3>
      <p class="b_Body"><a name="260745">This function returns the day of the week for a given date. Depending on the option you specify, the function returns the day of the week as a number, the full weekday name, or the abbreviated weekday name. The weekday name is locale-specific.</a></p>
      <p class="N_sb_ScanBold"><a name="260746">Syntax</a></p>
      <div class="rs_RSyntax"><a name="260747">string BirtDateTime.weekDay( Date date, integer option )</a></div>
      <p class="N_sb_ScanBold"><a name="260748">Parameters</a></p>
      <p class="RParameter"><a name="260749">date</a></p>
      <p class="bn_BodyNoLead"><a name="260750">A date object from which to get the day of the week.</a></p>
      <p class="RParameter"><a name="260751">option</a></p>
      <p class="bn_BodyNoLead"><a name="260752">Integer. Optional. A number that represents the format to return. Use one of the following values:</a></p>
      <div class="b1_Bullet1_outer" style="margin-left: 0pt">
        <table border="0" cellspacing="0" cellpadding="0" summary="" role="presentation">
          <tr style="vertical-align: baseline">
            <td>
              <div class="b1_Bullet1_inner" style="width: 14.1732283464567pt; white-space: nowrap">
                <img src="Bullet.png" alt="*" border="0" width="6" height="6" />
              </div>
            </td>
            <td width="100%">
              <div class="b1_Bullet1_inner"><a name="261044">1 to get the day as a number from 1 (Sunday) to 7 (Saturday)</a></div>
            </td>
          </tr>
        </table>
      </div>
      <div class="b1_Bullet1_outer" style="margin-left: 0pt">
        <table border="0" cellspacing="0" cellpadding="0" summary="" role="presentation">
          <tr style="vertical-align: baseline">
            <td>
              <div class="b1_Bullet1_inner" style="width: 14.1732283464567pt; white-space: nowrap">
                <img src="Bullet.png" alt="*" border="0" width="6" height="6" />
              </div>
            </td>
            <td width="100%">
              <div class="b1_Bullet1_inner"><a name="261051">2 to get the day as a number from 1 (Monday) to 7 (Sunday)</a></div>
            </td>
          </tr>
        </table>
      </div>
      <div class="b1_Bullet1_outer" style="margin-left: 0pt">
        <table border="0" cellspacing="0" cellpadding="0" summary="" role="presentation">
          <tr style="vertical-align: baseline">
            <td>
              <div class="b1_Bullet1_inner" style="width: 14.1732283464567pt; white-space: nowrap">
                <img src="Bullet.png" alt="*" border="0" width="6" height="6" />
              </div>
            </td>
            <td width="100%">
              <div class="b1_Bullet1_inner"><a name="261052">3 to get the day as a number from 0 (Monday) to 6 (Sunday)</a></div>
            </td>
          </tr>
        </table>
      </div>
      <div class="b1_Bullet1_outer" style="margin-left: 0pt">
        <table border="0" cellspacing="0" cellpadding="0" summary="" role="presentation">
          <tr style="vertical-align: baseline">
            <td>
              <div class="b1_Bullet1_inner" style="width: 14.1732283464567pt; white-space: nowrap">
                <img src="Bullet.png" alt="*" border="0" width="6" height="6" />
              </div>
            </td>
            <td width="100%">
              <div class="b1_Bullet1_inner"><a name="261060">4 to get the full weekday name, for example, Wednesday</a></div>
            </td>
          </tr>
        </table>
      </div>
      <div class="b1_Bullet1_outer" style="margin-left: 0pt">
        <table border="0" cellspacing="0" cellpadding="0" summary="" role="presentation">
          <tr style="vertical-align: baseline">
            <td>
              <div class="b1_Bullet1_inner" style="width: 14.1732283464567pt; white-space: nowrap">
                <img src="Bullet.png" alt="*" border="0" width="6" height="6" />
              </div>
            </td>
            <td width="100%">
              <div class="b1_Bullet1_inner"><a name="261061">5 to get the abbreviated weekday name, for example Wed</a></div>
            </td>
          </tr>
        </table>
      </div>
      <p class="b_Body"><a name="261062">If you omit this argument, the function assumes option 1.</a></p>
      <p class="N_sb_ScanBold"><a name="260757">Returns</a></p>
      <p class="b_Body"><a name="260758">String. The day of the week for a given date.</a></p>
      <p class="N_sb_ScanBold"><a name="260759">Examples</a></p>
      <p class="b_Body"><a name="260760">The following example shows the week day values returned for a specific date:</a></p>
      <div class="cf_CodeFirst"><a name="260761">BirtDateTime.weekDay( "2009-02-02" ) // returns 2</a></div>
      <div class="co_Code"><a name="260762">BirtDateTime.weekDay( "2009-02-02", 2 ) // returns 1</a></div>
      <div class="co_Code"><a name="260763">BirtDateTime.weekDay( "2009-02-02", 4 ) // returns Monday</a></div>
      <p class="b_Body"><a name="260764">The following example returns the day of the week for the current date:</a></p>
      <div class="cf_CodeFirst"><a name="260765">BirtDateTime.weekDay( (BirtDateTime.today() )</a></div>
      <h3 class="RH2_Method"><a name="261090">BirtDateTime.year</a></h3>
      <p class="b_Body"><a name="261091">This function returns the four-digit year value for a given date. For example, if the date is 2009-01-19, the function returns 2009.</a></p>
      <p class="N_sb_ScanBold"><a name="261092">Syntax</a></p>
      <div class="rs_RSyntax"><a name="261093">integer BirtDateTime.year( date )</a></div>
      <p class="N_sb_ScanBold"><a name="261094">Parameter</a></p>
      <p class="RParameter"><a name="261095">date</a></p>
      <p class="bn_BodyNoLead"><a name="261096">A date object from which to get the year.</a></p>
      <p class="N_sb_ScanBold"><a name="261097">Returns</a></p>
      <p class="b_Body"><a name="261098">Integer. The four-digit year value for a given date.</a></p>
      <p class="N_sb_ScanBold"><a name="261099">Examples</a></p>
      <p class="b_Body"><a name="261100">The following example returns the year for each value in the HireDate field:</a></p>
      <div class="cf_CodeFirst"><a name="261101">BirtDateTime.year( row["HireDate"] ) </a></div>
      <p class="b_Body"><a name="261102">The following example returns the year for the current date:</a></p>
      <div class="cf_CodeFirst"><a name="261103">BirtDateTime.year( (BirtDateTime.today())</a></div>
    </blockquote>
    <hr align="left" />
    <table align="right" summary="">
      <tr>
        <td class="WebWorks_Company_Name_Bottom">
          <a href="notices.html">(c) Copyright Actuate Corporation 2013</a>
        </td>
      </tr>
    </table>
  </body>
</html>